<!DOCTYPE html>
<html lang="en">
<head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>四川新华扬科技有限公司－</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="../../AceAdmin/assets/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="../../AceAdmin/assets/css/font-awesome.min.css" />
<link rel="stylesheet" href="../../AceAdmin/assets/css/ui.jqgrid.css" />
<link rel="stylesheet" href="../../AceAdmin/assets/css/chosen.css" />
<link rel="stylesheet" href="../../AceAdmin/assets/css/ace.min.css" />
<script src="../../AceAdmin/assets/js/ace-extra.min.js"></script>


<script src="../../js/common.js" type="application/javascript"></script>
<style type="text/css">
     html,body{
      width: 100%;
      height: 100%;
      padding: 0;
      margin: 0;
      background: #fff;
     }
     .staffZ{
        width: 100%;
        height: 50px;
        display: flex;
        margin-bottom: 20px;
     }
     .staffZL{
      flex: 2;
      line-height: 50px;
      text-align: right;
     }
     .staffZR{
      flex: 8;
     }
     input{
      height: 35px;
      border-radius: 5px;
      margin-top: 7px;
      border:1px solid #808080;
     }
     .long{
      width: 60%;
      border-radius: 5px;
      border:1px solid #808080;
     }
     .short{
      width: 95%;
     }
     .staffZ1{
        width: 100%;
        height: 100%;
        display: flex;
     }
     .staffZL1{
      flex: 2;
      line-height: 50px;
      text-align: right;
     }
     .staffZR1{
      flex: 3;
     }
     .zhu{
      flex: 5;
     }
     .font{
      height: 60px;
      width: 70%;
      overflow:hidden;
     }
     .zhus{
      font-size: 10px;
     }
     .staffBtns{
      width: 100%;
      
    }
    .weiz{
      width: 200px;
      margin: auto;
      display: flex;
    }
    .staffBtn{
       line-height: 35px;
      text-align: center;
      color: #fff;
      background: #1963AA;
      border-radius: 5px;
      margin-right: 15px;
    }
    .goOn{
      width: 80px;
    }
    .goretu{
      width: 50px;
    }
    .retu{
      line-height: 35px;
    }


</style>
</head>
<body>
<div class="staffAdd">
  <form id="staffAdds" action="" method=""  name="distribut_form">
  <div class="staffZ">
    <div class="staffZL">
      工号：
    </div>
    <div class="staffZR">
      <input  name="num" class="long num" placeholder="请输入工号">
    </div>
  </div>
  <div class="staffZ">
    <div class="staffZL">
      姓名：
    </div>
    <div class="staffZR">
      <input name="name" class="long name" placeholder="请输入姓名"> 
    </div>
  </div>
  <div class="staffZ">
    <div class="staffZL">
      职位：
    </div>
    <div class="staffZR">
      <input name="position" class="long position" placeholder="请输入职位">
    </div>
  </div>
  <div class="staffZ">
    <div class="staffZL1">
      绑定微信手机号：
    </div>
    <div class="staffZR1">
      <input  name="numbers" class="short numbers" placeholder="请输入绑定微信手机号">
    </div>
    <div class="zhu"><div class="font">此号将绑定企业微信，用于微信内登陆和接收AI雷达消息，一旦绑定不可更改</div></div>
  </div>
  <div class="staffZ" style="margin: 0;">
    <div class="staffZL1">
      名片展示手机号：
    </div>
    <div class="staffZR1">
      <input  name="phone" class="short phone" placeholder="请输入名片展示手机号">
    </div>
    <div class="zhu"><div class="font">此号将显示在AI名片的联系方式上，可在AI雷达“我”-“个人信息”中修改。</div></div>
  </div>
  <div class="staffZ" style="height: 20px;">
    <div class="staffZL"></div>
    <div class="staffZR zhus">
      *国际手机号,请在手机号前添加“+地区代码”，如 +8613800123456
    </div>
  </div>
  
  <div class="staffZ">
    <div class="staffZL">
      部门：
    </div>
    <div class="staffZR">
      <!-- <input  name=""> -->
    </div>
  </div>
  <!-- <input id="token" type="hidden" name="id" value="{$id}" />
  <input id="jin" type="hidden" name="jin"/> -->
  <div class="staffBtns">
    <div class="weiz">
      <div class="staffBtn goOn" name="1">保存并继续</div>
      <div class="staffBtn goretu" name="0">保存</div>
      <a  href="javascript:history.back(-1)" id="retu"><div class="retu">返回</div></a>
    </div>
  </div>
</form>
</div>
</body>
<script type="text/javascript">
        window.jQuery || document.write("<script src='../../AceAdmin/assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
    </script>
    <script type="text/javascript">
        if("ontouchend" in document) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
    </script>
<script src="../../AceAdmin/assets/js/jquery.dataTables.min.js"></script>
<script src="../../AceAdmin/assets/js/jquery.dataTables.bootstrap.js"></script>
<script src="../../AceAdmin/assets/js/bootstrap.min.js"></script>
<script src="../../AceAdmin/assets/js/typeahead-bs2.min.js"></script>
<script src="../../AceAdmin/assets/js/chosen.jquery.min.js"></script>
<script src="../../AceAdmin/assets/js/ace-elements.min.js"></script>
<script src="../../AceAdmin/assets/js/ace.min.js"></script>
<script src="../../AceAdmin/assets/js/bootbox.min.js"></script>
<script type="text/javascript">
  $(".staffBtn").click(function(){
        console.log($(this).attr("name"))
        var num = $.trim($('.num').val());
        var name = $.trim($('.name').val()); 
        var position = $.trim($('.position').val()); 
        var numbers = $.trim($('.numbers').val());
        var phone = $.trim($('.phone').val());
        // var fillXl = $('.fillXl option:selected').text();
        if(num == ''){
          alert('工号不能为空');
        return false;
        }
        if(name == ''){
          alert('姓名不能为空');
        return false;
        }
        if(numbers == ''){
          alert('绑定微信手机号不能为空');
        return false;
        }
        if(numbers && /^1[3|4|5|7|8|9]\d{9}$/.test(numbers)){

        } else{
          alert('绑定微信手机号输入有误，请核实');
          return false;
        }
        if(phone == ''){
          alert('名片展示手机号不能为空');
        return false;
        }
        if(phone && /^1[3|4|5|7|8|9]\d{9}$/.test(phone)){

        } else{
          alert('名片展示手机号输入有误，请核实');
          return false;
        }

          var staff =  $("#staffAdds").serialize();
          console.log(staff)
          if($(this).attr("name") == 1){
            window.location.reload();
          }
          if($(this).attr("name") == 0){
            // for(var i=0;i<2;i++){
              history.go(-1)
            // }
          }
  })
  $(".retu").click(function(){
    // window.location.reload();
    for(var i=0;i<2;i++){
    history.go(-1)
    }
    // location.replace(location.href);
  })
</script>
</html>